import {defHttp} from '/@/utils/http/axios';

enum Api {
  listPayNode = "/pay-service/payNode/listPayNode",

  list = "/pay-service/pay/order/pageOrder",
  getTradeData = "/pay-service/payMgt/trade/getTradeData",
  closeOrder = "/pay-service/payMgt/closeOrder",
  continuePay = "/pay-service/payMgt/continuePay",

  exportXls = "/system-service/config/exportXls",
  importExcel = "/system-service/config/importExcel",
}

/**
 * 导出url
 */
export const getExportUrl = Api.exportXls;
/**
 * 导入url
 */
export const getImportUrl = Api.importExcel;

/**
 * 查询列表
 * @param params
 */
export const getList = (params) => {
  return defHttp.get({url: Api.list, params});
}

/**
 * 获取交易数据
 * @param params
 */
export const getTradeData = (params) => {
  return defHttp.get({url: Api.getTradeData, params});
}

/**
 * 关闭订单
 * @param params
 */
export const closeOrder = (params) => {
  return defHttp.post({url: Api.closeOrder, params});
}


/**
 * 继续支付
 * @param params
 */
export const continuePay = (params) => {
  return defHttp.post({url: Api.continuePay, params});
}

/**
 * 查询列表
 * @param params
 */
export const listPayNode = (params) => {
  return defHttp.get({url: Api.listPayNode, params}, {joinParamsToUrl: true});
}



